/**
 * @file Log.h
 * @author Lost
 * @date 五月 2018
 * @brief 
 * 日志类
 */
#ifndef __LOG_H__
#define __LOG_H__

#include "Singleton.h"

#include <stdarg.h>
#include <iostream>
#include <string>
#include <log4cplus/logger.h>
#include <log4cplus/loggingmacros.h>


using namespace std;
using namespace log4cplus;
using namespace log4cplus::helpers;


#define LOG_DBG( format, ... )  LOG4CPLUS_DEBUG_FMT(CLog::Instance().m_cLogger, format, ##__VA_ARGS__  )
#define LOG_INFO( format, ... )  LOG4CPLUS_INFO_FMT(CLog::Instance().m_cLogger, format, ##__VA_ARGS__  )
#define LOG_WARN( format, ... )  LOG4CPLUS_WARN_FMT(CLog::Instance().m_cLogger, format, ##__VA_ARGS__  )
#define LOG_ERR( format, ... )  LOG4CPLUS_ERROR_FMT(CLog::Instance().m_cLogger, format, ##__VA_ARGS__  )

class CLog : public CSingleton<CLog>
{
public:
    CLog();
    ~CLog();

public:
    Logger m_cLogger;
};



#endif // __LOG_H__


